/**
 * Created by 小润 on 2017/3/24.
 */
$(document).ready(function(){
    init();
    $('.message').on('click',function(){
        var userId = localStorage.getItem("userId");
        var tagId =$("#tid").val();
        if(userId == "" || userId == null){
            window.location.href="/h5/user/login";
            localStorage.setItem('headurl', "/h5/index/home");D
        }else{
            window.location.href="/h5/index/home?userId="+userId;
        }
    });

    $('.family-list').off("click",".go-backk").on('click',".go-backk",function(){
        $(".header,.tab-content-section,.footer").css('display','block');
        $(this).parents('.family-list').css('display','none');
        return false
    });

    $('.logout').on('click',function () {
        localStorage.clear();
        window.location.href="/h5/user/tomzone";
    })

    function init(){
        var menu_li = $('.menu_li');
        for(var i=0;i<menu_li.length;i++){
            console.log(menu_li.length);
            menu_li.eq(i).click(function(){
                console.log(menu_li.length)
                var value = $(this).children('a').html();
                console.log(value)
                $('#dropdownMenu').text(value);
                return false;
            })
        }

    }

});

